home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************
-
- ** $Filename: decimal.FPL $
- ** $Release: 5.0 $
- ** $Date: 93/06/15 $
- **
- ** (C) Copyright 1992, 1993 by FrexxWare
- ** All Rights Reserved
-
- ****************************************************************************
-
- >>>>>> Frexx Programming Language (FPL) demonstration program <<<<<<
- Author: Daniel Stenberg.
-
- ****************************************************************************/
-
- int a, b, n, number=getint("Insert maximum number of decimals: ");
- string s;
- a=getint("Insert left operand: ");
- b=getint("Insert right operand: ");
- s=itoa(a/b);
- if(a%b)
- for(s+=".";n<number;n++)
- s+=itoa((a=a%b*10)/b);
- printf("%s\n", s);
-